<template>
  <div class="hello">
    <h1>{{ msg | capitalize }}</h1>
  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  props:['msg'],
  data() {
    return {};
  },
  filters: {
    capitalize: function(value) {
      window.console.log("rd: value", value);
      if (!value) return "";
      value = value.toString();
      return value.charAt(0).toUpperCase() + value.slice(1); // 首字母大写
    }
  }
};
</script>
